package org.jet.emall.prod.po;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户余额变动日志表
 * </p>
 *
 * @author xiaozai
 * @since 2020-04-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_customer_balance_log")
@ApiModel(value="CustomerBalanceLog对象", description="用户余额变动日志表")
public class CustomerBalanceLog implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "余额变动日志id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "会员ID")
    private Long customerId;

    @ApiModelProperty(value = "记录来源: 1-订单, 2-退货单")
    private Byte source;

    @ApiModelProperty(value = "相关单据编号")
    private Integer sourceSn;

    @ApiModelProperty(value = "记录生成时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "变动金额,单位为分")
    private Long amount;

    @TableLogic
    @ApiModelProperty(value = "逻辑删除: 1-已删除, 0-未删除")
    private Byte deleted;


}
